public class Solution {

    double radius;
    double x_center;
    double y_center;

    public Solution(double radius, double x_center, double y_center) {
        this.radius = radius;
        this.x_center = x_center;
        this.y_center = y_center;
    }

    public double[] randPoint() {
        while (true) {
            double tempX = (Math.random() - 0.5) * 2 * radius;
            double tempY = (Math.random() - 0.5) * 2 * radius;
            if (tempX * tempX + tempY * tempY <= radius * radius)
                return new double[]{tempX + x_center, tempY + y_center};
        }
    }
}
